package cn.dhnep.demo.mapper;

import cn.dhnep.demo.pojo.Earnings;
import cn.dhnep.demo.pojo.Order;
import cn.dhnep.demo.pojo.frontvo.OrderAddCount;
import cn.dhnep.demo.pojo.frontvo.OrderVo;
import cn.dhnep.demo.util.Page;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author dhn
 * @since 2021-08-18
 */
public interface OrderMapper extends BaseMapper<Order> {


    //订单查询分页数据
    List<Order> selectPageList(Page page);

    //订单分页数据总数
    Integer selectPageCount(Page page);

    //id查询订单
    Order idqueryOrder(@Param("id") Integer id);

    //修改订单
    int updateorder(Order order);

    /**
     * 查看昨日下单情况
     */
    List<OrderAddCount> getYesterdayOrder(String name);

    /**
     * 骑手昨日收货重量和收益
     */
    List<OrderVo> horsemanEvenDayEarnings();

    /**
     * 骑手昨日订单量
     */
    Integer horsemanYesterdayCount(String name);
}
